<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>产品管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			//$("#name").focus();
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/siteproduct/siteProduct/?orderBy=createTime desc">产品列表</a></li>
		<li class="active"><a href="${ctx}/siteproduct/siteProduct/form?id=${siteProduct.id}">产品<shiro:hasPermission name="siteproduct:siteProduct:edit">${not empty siteProduct.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="siteproduct:siteProduct:edit">查看</shiro:lacksPermission></a></li>
	</ul><br/>
	<form:form id="inputForm" modelAttribute="siteProduct" action="${ctx}/siteproduct/siteProduct/save" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<sys:message content="${message}"/>		
		<div class="control-group">
			<label class="control-label">项目类型：</label>
			<div class="controls">
				<%-- <form:radiobuttons path="type" items="${fns:getDictList('')}" itemLabel="label" itemValue="value" htmlEscape="false" class=""/> --%>
				<span><input name="type" class="required" type="radio" value="1" checked="checked"><label for="type1">活期</label></span>
				<span><input name="type" class="required" type="radio" value="2" ${siteProduct.type == 2 ? "checked=checked" : ""}><label for="type1">定期</label></span>
				<span><input name="type" class="required" type="radio" value="3" ${siteProduct.type == 3 ? "checked=checked" : ""}><label for="type1">体验标</label></span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">排序：</label>
			<div class="controls">
				<form:input path="sort" htmlEscape="false" maxlength="2" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">产品分类名称：</label>
			<div class="controls">
				<form:input path="productName" htmlEscape="false" maxlength="50" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">产品提供方名称：</label>
			<div class="controls">
				<form:select path="provider" class="input-xlarge ">
					<form:option value="" label=""/>
					<%-- <form:options items="${fns:getDictList('')}" itemLabel="label" itemValue="value" htmlEscape="false"/> --%>
					<option value="上海皓秀" ${siteProduct.provider == "上海皓秀" ? "selected=selected" : ""}>上海皓秀</option>
				</form:select>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">备注：</label>
			<div class="controls">
				<form:input path="info" htmlEscape="false" maxlength="500" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">产品简介：</label>
			<div class="controls">
				<form:input path="title" htmlEscape="false" maxlength="500" class="input-xlarge "/>
			</div>
		</div>
		<%-- <div class="control-group">
			<label class="control-label">创建人：</label>
			<div class="controls">
				<form:input path="creator" htmlEscape="false" maxlength="7" class="input-xlarge " disabled="true"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">创建时间：</label>
			<div class="controls">
				<form:input path="createTime" htmlEscape="false" maxlength="20" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">修改人：</label>
			<div class="controls">
				<form:input path="updator" htmlEscape="false" maxlength="7" class="input-xlarge " disabled="true"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">修改时间：</label>
			<div class="controls">
				<form:input path="updateTime" htmlEscape="false" maxlength="20" class="input-xlarge "/>
			</div>
		</div> --%>
		<div class="control-group">
			<label class="control-label">总额：</label>
			<div class="controls">
				<form:input path="totalAmount" htmlEscape="false" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">可购余额：</label>
			<div class="controls">
				<form:input path="balance" htmlEscape="false" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">起投金额：</label>
			<div class="controls">
				<form:input path="minAmount" htmlEscape="false" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">投资总上线：</label>
			<div class="controls">
				<form:input path="maxAmount" htmlEscape="false" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">单笔最小转出：</label>
			<div class="controls">
				<form:input path="minRedeem" htmlEscape="false" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">单笔最大转出：</label>
			<div class="controls">
				<form:input path="maxRedeem" htmlEscape="false" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">单月最大转出：</label>
			<div class="controls">
				<form:input path="maxMonthly" htmlEscape="false" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">单日最大转出：</label>
			<div class="controls">
				<form:input path="maxDaily" htmlEscape="false" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">每月最大转出次数：</label>
			<div class="controls">
				<form:input path="maxNumber" htmlEscape="false" maxlength="1" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">投标递增金额：</label>
			<div class="controls">
				<form:input path="stepAmount" htmlEscape="false" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">年化收益：</label>
			<div class="controls">
				<form:input path="rate" htmlEscape="false" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">平台加息：</label>
			<div class="controls">
				<form:input path="addRate" htmlEscape="false" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">复利利率：</label>
			<div class="controls">
				<form:input path="compoundRate" htmlEscape="false" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">项目周期（天）：</label>
			<div class="controls">
				<form:input path="productTime" htmlEscape="false" maxlength="6" class="input-xlarge "/>
			</div>
		</div>
		<%-- <div class="control-group">
			<label class="control-label">项目周期（按月）  1:0-1个月，3:1-3个月：</label>
			<div class="controls">
				<form:input path="term" htmlEscape="false" maxlength="2" class="input-xlarge "/>
			</div>
		</div> --%>
		<div class="control-group">
			<label class="control-label">合同模板路径：</label>
			<div class="controls">
				<form:input path="agreementUrl" htmlEscape="false" maxlength="200" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">风险提示函路径：</label>
			<div class="controls">
				<form:input path="riskLetterUrl" htmlEscape="false" maxlength="200" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">购买时要求最低风险评级级别：</label>
			<div class="controls">
				<form:input path="riskLevel" htmlEscape="false" maxlength="1" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">状态：</label>
			<div class="controls">
				<%-- <form:input path="stauts" htmlEscape="false" maxlength="1" class="input-xlarge "/> --%>
				<span><input name="stauts" class="required" type="radio" value="2" checked="checked"><label for="stauts1">未上线</label></span>
				<span><input name="stauts" class="required" type="radio" value="1" ${siteProduct.stauts == 1 ? "checked=checked" : ""}><label for="stauts1">售卖</label></span>
				<span><input name="stauts" class="required" type="radio" value="0" ${siteProduct.stauts == 0 ? "checked=checked" : ""}><label for="stauts1">停售</label></span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">是否能使用加息劵：</label>
			<div class="controls">
				<%-- <form:radiobuttons path="isCoupon" items="${fns:getDictList('')}" itemLabel="label" itemValue="value" htmlEscape="false" class=""/> --%>
				<span><input name="isCoupon" class="required" type="radio" value="0" checked="checked"><label for="isCoupon1">否</label></span>
				<span><input name="isCoupon" class="required" type="radio" value="1" ${siteProduct.isCoupon == 1 ? "checked=checked" : ""}><label for="isCoupon1">是</label></span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">购买锁定期（天）：</label>
			<div class="controls">
				<form:input path="lockPeriod" htmlEscape="false" maxlength="6" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">是否能使用红包：</label>
			<div class="controls">
				<%-- <form:radiobuttons path="isPacket" items="${fns:getDictList('')}" itemLabel="label" itemValue="value" htmlEscape="false" class=""/> --%>
				<span><input name="isPacket" class="required" type="radio" value="0" checked="checked"><label for="isPacket1">否</label></span>
				<span><input name="isPacket" class="required" type="radio" value="1" ${siteProduct.isPacket == 1 ? "checked=checked" : ""}><label for="isPacket1">是</label></span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">计息方式：</label>
			<div class="controls">
				<%-- <form:radiobuttons path="interestType" items="${fns:getDictList('')}" itemLabel="label" itemValue="value" htmlEscape="false" class=""/> --%>
				<span><input name="interestType" class="required" type="radio" value="0" checked="checked"><label for="interestType1">T+0</label></span>
				<span><input name="interestType" class="required" type="radio" value="1" ${siteProduct.interestType == 1 ? "checked=checked" : ""}><label for="interestType1">T+1</label></span>
				<span><input name="interestType" class="required" type="radio" value="2" ${siteProduct.interestType == 2 ? "checked=checked" : ""}><label for="interestType1">T+2</label></span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">备用字段：</label>
			<div class="controls">
				<form:input path="remark2" htmlEscape="false" maxlength="100" class="input-xlarge "/>
			</div>
		</div>
		<div class="form-actions">
			<shiro:hasPermission name="siteproduct:siteProduct:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;</shiro:hasPermission>
			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
		</div>
	</form:form>
</body>
</html>